package commRedisRpc

type channel struct {
	Client *channelClient
	Server *channelServer
}

type device struct {
	Client *deviceClient
	Server *deviceServer
}

type persist struct {
	Client *persistClient
	Server *persistServer
}

type manager struct {
	Client *managerClient
	Server *managerServer
}

type channelClient struct {
	Report  *redisListChannelClientReport
	Request *redisListChannelClientRequest
	Respond *redisListChannelClientRespond
}

type channelServer struct {
	Report  *redisListChannelServerReport
	Request *redisListChannelServerRequest
	Respond *redisListChannelServerRespond
}

type deviceClient struct {
	Report  *redisListDeviceClientReport
	Request *redisListDeviceClientRequest
	Respond *redisListDeviceClientRespond
}

type deviceServer struct {
	Report  *redisListDeviceServerReport
	Request *redisListDeviceServerRequest
	Respond *redisListDeviceServerRespond
}

type persistClient struct {
	ManageRequest *redisListPersistClientManageRequest
	ManageRespond *redisListPersistClientManageRespond
	RecordRequest *redisListPersistClientRecordRequest
	ValueRequest  *redisListPersistClientValueRequest
}

type persistServer struct {
	ManageRequest *redisListPersistServerManageRequest
	ManageRespond *redisListPersistServerManageRespond
	RecordRequest *redisListPersistServerRecordRequest
	ValueRequest  *redisListPersistServerValueRequest
}

type managerClient struct {
	Request *redisListManagerClientRequest
	Respond *redisListManagerClientRespond
}

type managerServer struct {
	Request *redisListManagerServerRequest
	Respond *redisListManagerServerRespond
}

func initChannel() {
	Channel = &channel{}
	Channel.Client = &channelClient{}
	Channel.Server = &channelServer{}

	Channel.Client.Report = &redisListChannelClientReport{}
	Channel.Client.Report.redisList.MaxSize = 1000

	Channel.Client.Request = &redisListChannelClientRequest{}
	Channel.Client.Request.redisList.MaxSize = 1000

	Channel.Client.Respond = &redisListChannelClientRespond{}
	Channel.Client.Respond.redisList.Timeout = 60 * 1000

	Channel.Server.Report = &redisListChannelServerReport{}
	Channel.Server.Report.redisList.MaxSize = 1000

	Channel.Server.Request = &redisListChannelServerRequest{}
	Channel.Server.Request.redisList.MaxSize = 1000

	Channel.Server.Respond = &redisListChannelServerRespond{}
	Channel.Server.Respond.redisList.Timeout = 60 * 1000
}

func initDevice() {
	Device = &device{}
	Device.Client = &deviceClient{}
	Device.Server = &deviceServer{}

	Device.Client.Report = &redisListDeviceClientReport{}
	Device.Client.Report.redisList.MaxSize = 1000

	Device.Client.Request = &redisListDeviceClientRequest{}
	Device.Client.Request.redisList.MaxSize = 1000

	Device.Client.Respond = &redisListDeviceClientRespond{}
	Device.Client.Respond.redisList.Timeout = 60 * 1000

	Device.Server.Report = &redisListDeviceServerReport{}
	Device.Server.Report.redisList.MaxSize = 1000

	Device.Server.Request = &redisListDeviceServerRequest{}
	Device.Server.Request.redisList.MaxSize = 1000

	Device.Server.Respond = &redisListDeviceServerRespond{}
	Device.Server.Respond.redisList.Timeout = 60 * 1000
}

func initPersist() {
	Persist = &persist{}
	Persist.Client = &persistClient{}
	Persist.Server = &persistServer{}

	Persist.Client.ManageRequest = &redisListPersistClientManageRequest{}
	Persist.Client.ManageRequest.redisList.MaxSize = 1000

	Persist.Client.ManageRespond = &redisListPersistClientManageRespond{}
	Persist.Client.ManageRespond.redisList.Timeout = 60 * 1000

	Persist.Client.RecordRequest = &redisListPersistClientRecordRequest{}
	Persist.Client.RecordRequest.redisList.MaxSize = 1000

	Persist.Client.ValueRequest = &redisListPersistClientValueRequest{}
	Persist.Client.ValueRequest.redisList.MaxSize = 1000

	Persist.Server.ManageRequest = &redisListPersistServerManageRequest{}
	Persist.Server.ManageRequest.redisList.MaxSize = 1000

	Persist.Server.ManageRespond = &redisListPersistServerManageRespond{}

	Persist.Server.RecordRequest = &redisListPersistServerRecordRequest{}
	Persist.Server.RecordRequest.redisList.MaxSize = 1000

	Persist.Server.ValueRequest = &redisListPersistServerValueRequest{}
	Persist.Server.ValueRequest.redisList.MaxSize = 1000
}

func initManager() {
	Manager = &manager{}
	Manager.Client = &managerClient{}
	Manager.Server = &managerServer{}

	Manager.Client.Request = &redisListManagerClientRequest{}
	Manager.Client.Request.redisList.MaxSize = 1000

	Manager.Client.Respond = &redisListManagerClientRespond{}
	Manager.Client.Respond.redisList.Timeout = 60 * 1000

	Manager.Server.Request = &redisListManagerServerRequest{}
	Manager.Server.Request.redisList.MaxSize = 1000

	Manager.Server.Respond = &redisListManagerServerRespond{}
	Manager.Server.Respond.redisList.Timeout = 60 * 1000
}
